home *** CD-ROM | disk | FTP | other *** search
- ; minimal startup code
- ;
- ; If You use this You may not use most functions from vc.lib.
- ; Also DOSBase and SysBase will not be set up.
- ; You can only call exit().
- ; main() should be declared like this:
- ; int main(char *commandline); or int main(void);
-
- section "CODE",code
-
- xref _main
- xdef _exit
- xdef _SysBase
-
- near a4,-2
- initnear
- move.l 4.w,_SysBase(a4); set up SysBase
- move.l a7,InitialSP(a4); Stack merken
- clr.b -1(a0,d0) ; 0 ans Ende
- move.l a0,-(a7) ; an main uebergeben
- jsr _main
- moveq #0,d0 ; EXIT_SUCCESS, if exit() wasn't called
- bra.b exit
- _exit
- move.l 4(a7),d0 ; Returnwert setzen
- exit
- move.l InitialSP(a4),a7; Stack zuruecksetzen
- rts
-
- section "__MERGED",data
- InitialSP
- dc.l 0
- _SysBase
- dc.l 0
-
-